/*
 * @Author: NaturalHulk 2066634567@qq.com
 * @Date: 2024-01-22 18:43:37
 * @LastEditors: NaturalHulk 2066634567@qq.com
 * @LastEditTime: 2024-01-30 11:18:33
 * @FilePath: /umi_demo/src/api/system/user.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";

// 列表
export function GetListAPI(params: object) {
  return request({
    url: "system/user/list",
    method: "GET",
    params,
  });
}

// 新增用户
export function addUser(data: object) {
  return request({
    url: "/system/user",
    method: "post",
    data: data,
  });
}

// 查询部门下拉树结构
export function GetDeptDataAPI(params: object) {
  return request({
    url: "/system/dept/list",
    method: "GET",
    params,
  });
}

// 查询用户详细
export function getUser(userId: string) {
  return request({
    url: "/system/user/" + userId,
    method: "get",
  });
}

// 删除用户
export function delUser(userId: string) {
  return request({
    url: "/system/user/" + userId,
    method: "delete",
  });
}

// 修改用户
export function updateUser(data: string) {
  return request({
    url: "/system/user",
    method: "put",
    data: data,
  });
}
